﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserOrders.aspx.cs" Inherits="Tradier.UserOrders" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link rel="stylesheet" type="text/css" href="/Contents/flat-ui/css/vendor/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="/Contents/flat-ui/css/flat-ui.css" />
    <link rel="stylesheet" type="text/css" href="/Contents/css/style.css" />
</head>
<body>
    <form id="form1" runat="server">
    <div  class="trading-template container">
        <%if (Orders != null)
          {
              foreach (var userModel in Orders)
              {
                  
        %>
        <div class="panel-default">
        <div  class="panel-heading">
            Account Numner : <%=userModel.Key %>
        </div>
        <table>
            <thead>
                <tr>
                    <th>
                        Symbol
                    </th>
                    <th>
                        Side
                    </th>
                    <th>
                        Qty.
                    </th>
                    <th>
                        Type
                    </th>
                    <th>
                        Dur.
                    </th>
                    <th>
                        Status
                    </th>
                    <th>
                        Filled/Qty.
                    </th>
                    <th>&nbsp;</th>
                    <th>&nbsp;</th>
                </tr>
            </thead>
            <tbody>
                <%foreach (var order in userModel.Value)
                  {
                      %>
                        <tr>
                            <td>
                                <%=order.Symbol %>
                            </td>
                            <td>
                                <%=order.Side %>
                            </td>
                            <td>
                                <%=order.Quantity %>
                            </td>
                            <td>
                                <%=order.Type %>
                            </td>
                            <td>
                                <%=order.Duration %>
                            </td>
                            <td>
                                <%=order.Status %>
                            </td>
                            <td>
                                <%=order.LastFillQuantity %>/<%=order.Quantity %>
                            </td>
                            <td>
                                <a href="/ChangeOrder.aspx?id=<%= order.Id %>&account_id=<%= userModel.Key %>">Change</a>         
                            </td>
                            <td>
                                <a href="/CancelOrder.aspx?id=<%= order.Id %>&account_id=<%= userModel.Key %>">Cancel</a>         
                            </td>
                        </tr>
                      <%
                      
                  } %>
                <tr>
                </tr>
            </tbody>
        </table>
        </div>
        <%
              }
          }%>
    </div>
    </form>
</body>
</html>
